package com.qj.travel.service.impl;

import com.qj.travel.db.dao.TransInfoDao;
import com.qj.travel.db.model.TransInfoModel;
import com.qj.travel.service.TransInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2016/10/1.
 */
@Service
public class TransInfoServiceImpl implements TransInfoService {

    @Autowired
    private TransInfoDao transInfoDao;

    public List<TransInfoModel> getTransInfoList() {
        return transInfoDao.getTransInfoList();
    }

    public List<TransInfoModel> getTransBySort(String videoClass, int startRow, int pageSize) {
        return transInfoDao.getTransBySort(videoClass,startRow,pageSize);
    }

    public TransInfoModel getTransInfo(int videoId) {
        return transInfoDao.getTransInfo(videoId);
    }

    public int insertTransInfo(TransInfoModel transInfoModel) {
        return transInfoDao.insertTransInfo(transInfoModel);
    }

    public List<TransInfoModel> getTransInfoListByPage(int startRow, int pageSize) {
        return transInfoDao.getTransInfoListByPage(startRow, pageSize);
    }

    public int deleteTrans(int transId) {
        return transInfoDao.deleteTrans(transId);

    }

    public List<TransInfoModel> getTransPublished(int startRow, int pageSize) {
        return transInfoDao.getTransPublished(startRow, pageSize);
    }

    public List<TransInfoModel> getTransPublishedBySort(String videoClass, int startRow, int pageSize) {
        return transInfoDao.getTransPublishedBySort(videoClass, startRow, pageSize);
    }

    public List<TransInfoModel> getTransNotPublished(int startRow, int pageSize) {
        return transInfoDao.getTransNotPublished(startRow,pageSize);
    }

    public int updateLock(int videoId) {
        return transInfoDao.updateLock(videoId);
    }

    public int updatePublish(int videoId) {
        return transInfoDao.updatePublish(videoId);
    }

    public int cancelPublish(int videoId) {
        return transInfoDao.cancelPublish(videoId);
    }

    public int updateNotPass(int videoId) {
        return transInfoDao.updateNotPass(videoId);
    }

    public int updateClass(int videoId, String videoClass) {
        return transInfoDao.updateClass(videoId,videoClass);
    }

    public List<TransInfoModel> getTransByUser(String userId) {
        return transInfoDao.getTransByUser(userId);
    }

    public List<TransInfoModel> getTransByUserPublished(String userId) {
        return transInfoDao.getTransByUserPublished(userId);
    }

    public List<TransInfoModel> getTransByUserNotPublished(String userId) {
        return transInfoDao.getTransByUserNotPublished(userId);
    }

    public List<TransInfoModel> getTransByUserNotPass(String userId) {
        return transInfoDao.getTransByUserNotPass(userId);
    }

    public List<TransInfoModel> getTransNotPass() {
        return transInfoDao.getTransNotPass();
    }

}
